import { MutationRes } from 'src/modules/shared/vo/mutation.res';
import { Resolver, Mutation, Args } from '@nestjs/graphql';
import { CreateAccountRoleInput } from './dto/create.account.role.input';
import { AccountRoleService } from '../../services/account-role/account-role.service';

@Resolver()
export class AccountRoleResolver {
  constructor(
    private readonly accountRoleService: AccountRoleService
  ) {}

  @Mutation(() => MutationRes)
  async createAccountRole(
    @Args('data') createAccountRoleInput: CreateAccountRoleInput,
  ):Promise<MutationRes> {
    return await this.accountRoleService.createAccountRole(createAccountRoleInput);
  }
}
